Skip to main content

revCopyFolder

Type

command

Summary

Copies a folder with all its contents.

Syntax

revCopyFolder <folderToCopy>, <destinationFolder>

Description

Use the revCopyFolder command to make a copy of a folder inside another folder.

The revCopyFolder command makes a copy of the entire folder, including all files, subfolders, and their contents. The folder remains in its original location and the copy is placed in the new location.

note

When included in a standalone application, the Common library is implemented as a hidden group and made available when the group receives its first openBackground message. During the first part of the application's startup process, before this message is sent, the revCopyFolder command is not yet available. This may affect attempts to use this command in startup, preOpenStack, openStack, or preOpenCardhandlers in the main stack. Once the application has finished starting up, the library is available and the revCopyFolder command can be used in any handler.

note

To copy a bundle on Mac OS X systems, use the revCopyFile command

note

On Linux and OS X systems, folder paths can contain the tilde (~) character, referring to the current user's home directory. Using these chars is not supported by revCopyFolder, and it is necessary to replace the tilde with its literal value (eg /home/userName)

Parameters

NameTypeDescription

folderToCopy

The folderToCopy specifies the name and location of the folder. If you specify a name but not a location, LiveCode assumes the folder is in the defaultFolder.

destinationFolder

The destinationFolder specifies the name and location of the folder where the copy will be created. If you specify a name but not a location, LiveCode assumes the destination folder is in the defaultFolder.

Examples

revCopyFolder "E:/Settings","C:/Program Files/My App/Settings"
revCopyFolder "data","backups"

library: Common library, library

message: startup, openBackground, preOpenStack, openStack

command: create alias, revDeleteFolder, revCopyFile

control structure: function

function: result

glossary: return, standalone application, file, shell, handler, platform, command, Windows, main stack, OS X, AppleScript, group, result, Unix, message, folder, subfolder, Mac OS

Compatibility and Support

Introduced

LiveCode 1.1.1

OS

mac

windows

linux

Platforms

desktop

server

Thank you for your feedback!

Was this page helpful?